﻿using OpenVision.Models;
using System.Runtime.Serialization;

namespace OpenVisionWebService.Models
{
    [DataContract]
    public class CollarGetPositionModel
    {
        [DataMember(Name = "longitude")]
        public double Longitude { get; set; }

        [DataMember(Name = "latitude")]
        public double Latitude { get; set; }

        public static CollarGetPositionModel CreateModel(Collar collar)
        {
            CollarGetPositionModel model = new CollarGetPositionModel()
            {
                Longitude = collar.Longitude,
                Latitude = collar.Latitude
            };

            return model;
        }
    }
}